package com.devunion.reader.client.widget;

import com.extjs.gxt.ui.client.widget.form.LabelField;

/**
 * @author Timoshenko Alexander 24.06.2009 : 23:51:21
 */
public class CustomLabelField extends LabelField {
    private String labelSeparator = ":";
    private boolean isHTML = true;

    public CustomLabelField() {
    }

    public CustomLabelField(boolean HTML) {
        this();
        isHTML = HTML;
    }

    public void setLabelSeparator(String labelSeparator) {
        this.labelSeparator = labelSeparator;
    }

    @Override
    public void setFieldLabel(String s) {
        super.setFieldLabel("<b>" + s + "</b>");
    }


    @Override
    public void setText(String s) {
        if (isHTML) {
            super.setText(s);
        } else {
            super.setText("<pre>" + s + "</pre>");
        }
    }
}
